<template>
<div class="left">
    <el-menu
    :collapse=false
    class="caidan"
    background-color="#2a2a33"
    text-color="white"
    active-text-color="#ffd04b"
    >  
  <ul>
    <li @click="zy">
      <el-icon>
        <House />
        </el-icon>
      主页
    </li>
    <li @click="qtsy()">
      <el-icon><Tickets /></el-icon>
      前台首页
    </li>
    <li>
      
      <el-sub-menu index="1">
        <template #title>
          <el-icon><UserFilled /></el-icon>
          用户管理
          </template>
        <el-menu-item index="1-1" @click="yonghu()">二级：用户列表</el-menu-item>
      </el-sub-menu>
    </li>
        <li>
          
      <el-sub-menu index="2">
        <template #title>
          <el-icon><Grid /></el-icon>
          商品管理
          </template>
        <el-menu-item index="2-1" @click="sf()">商品分类管理</el-menu-item>
        <el-menu-item index="2-2" @click="sp()">商品列表</el-menu-item>
        <el-menu-item index="2-3" @click="lb()">轮播图管理</el-menu-item>
        <el-menu-item index="2-4" @click="dd()">订单管理</el-menu-item>
      </el-sub-menu>
    </li>

    <li @click="ys()">
      <el-icon><Notebook /></el-icon>
      营收管理
    </li>
    <li>
      <el-sub-menu index="3">
        <template #title>
          <el-icon><Folder /></el-icon>
      文件管理
        </template>
        <el-menu-item index="3-1">文件管理</el-menu-item>
        <el-menu-item index="3-2" @click="tx()">头像管理</el-menu-item>
      </el-sub-menu>
      
    </li>
  </ul>
      </el-menu>
</div>
</template>

<script setup>
import router from "@/router";
import { House,Tickets,UserFilled,Grid,Notebook,Folder } from "@element-plus/icons-vue";
const yonghu=()=>{
  router.push('/admin/index/guan')
}
const zy=()=>{
  router.push('/admin/index')
}
const dd =()=>{
  router.push('/admin/index/dg')
}
const sp=()=>{
  router.push('/admin/index/sp')
}
const lb=()=>{
  router.push('/admin/index/lb')
}
const tx=()=>{
  router.push('/admin/index/tx')
}
const sf=()=>{
  router.push('/admin/index/sf')
}
const ys=()=>{
  router.push('/admin/index/ys')
}
const qtsy=()=>{
  router.push('/home/')
}
</script>

<style scoped>
.left{
  width: 100%;
  height: 100%;
}
ul{
  height: 100%;
  background-color: #2a2a33;
  padding-top: 5px;
}
li{
  color: white;
  font-weight: 700;
  margin-left: 5px;
  margin-top: 10px;
}

</style>